/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vm;

import java.awt.Component;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

/**
 *
 * @author Peer
 */
class CenterCellRenderer extends DefaultTableCellRenderer {

    JLabel renderer;

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {

        renderer = (JLabel)super.getTableCellRendererComponent(table, value, false, false, row, column);
        renderer.setHorizontalAlignment(JLabel.CENTER);
        return renderer;
    }
}
